<!doctype html>
<html lang="enCH">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>新联学院“十佳学生”投票系统</title>
    <link href="/static/css/index.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css" href="/static/css/reset.css">
    <link rel="stylesheet" type="text/css" href="/static/css/main.css">
    <script type="text/javascript" src="/static/js/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" src="/static/js/main.js"></script>
    <script src="/static/js/ini.js"></script>
</head>

<body>
<table cellSpacing=0 cellPadding=0 align=center width="960px">
    <tr>
        <td id="banner">"十佳学生"评选

            {% if user %} {# 已登录 {{ url_for(" user.user_info") }} #}

            <div class="user_login fr">
                <img {% if user.image_path %}
                    src="{{ user.image_path }}"
                     {% else %}
                     src="/static/images/1.jpg"
                     {% endif %}    class="lgin_pic">
                <a href="http://127.0.0.1:8000/home/index" id="nick_name">{{ user.user_name }}</a>
                <a href="javascript:;" onclick="logout()">退出</a>
            </div>

            {% else %}

            <div class="user_btns fr">
                <a href="javascript:;" class="login_btn">登录</a> / <a href="javascript:;" class="register_btn">注册</a>
            </div>

            {% endif %}

        </td>
    </tr>
    <tr>
        <td id="menu"><a href="http://127.0.0.1:8000/home/index">首页</a>

            - <a href="http://127.0.0.1:8000/home/introduce">活动介绍</a>

            - <a href="http://127.0.0.1:8000/home/rule">投票规则</a>

            - <a href="http://127.0.0.1:8000/home/affiche">系统公告</a>

            - <a href="http://127.0.0.1:8000/home/list" target="_blank">评选排行</a>

            - <a href="http://127.0.0.1:8000/home/personal" target="_blank">个人中心</a>
        </td>
    </tr>
</table>
<table width="960px" align="center" bgcolor="#F0F7FF">
    <tr>
        <td id="info2" colspan="5">
            为了进一步健全和完善学院管理制度，逐步建立起一种客观、公正、科学的评价考核机制，引导、保护和发挥广大学生的积极性、主动性和创造性，提高全体同学的积极性，共同成长、成才树立榜样，激励全体同学不断进取，结合我校实际情况，开展“十佳学生”评选活动。

            <td>
        <div class="user_data_con" >
            <form method="post" action='http://127.0.0.1:8000/home/index'>
                User ID: <input type="text" name="userID" value=" "><br>
                User Name: <input type="text" name="userNAME" value=" "><br>
                <input type="submit" value="搜索用户">
            </form>
        </div>
    </td>

        </td>
    </tr>
    <tr>
        <td id="info3" colspan="5">知识就是力量</td>
    </tr>

    {% for use in users %}
        {% if use.inx == 1 %}
            <form name="vote" id="vote" method="post" action='http://127.0.0.1:8000/home/index'/>
        <td>
            <table width="18%" align="center" bgcolor="#D1E3FE" style="margin:5px;">
                <tr>
                    <td colspan="2">
                        <a href="http://127.0.0.1:8000/home/rule?id={{use.id}}" target="_blank"><img src={{use.image_path}} width="175" height="150" border=0 alt="{{use.user_name}}"></a>
                    </td>
                </tr>
                <tr align="center">
                    <td colspan="2">
                       ID:{{use.id}}&nbsp&nbsp&nbsp&nbsp{{use.user_name}}</td>
                </tr>
                <tr align="center">
                    <td>排名：<span color=blue>{{forloop.counter}}</span></td>
                    <td>票数：<span color=red>{{use.vote_num}}</span></td>
                </tr>
            </table>
        </td>
        </form>
            <tr></tr>
        {% else %}
            <form name="vote" id="vote" method="post" action='http://127.0.0.1:8000/home/index'/>
        <td>
            <table width="18%" align="center" bgcolor="#D1E3FE" style="margin:5px;">
                <tr>
                    <td colspan="2">
                        <a href="http://127.0.0.1:8000/home/rule?id={{use.id}}" target="_blank"><img src={{use.image_path}} width="175" height="150" border=0 alt="{{use.user_name}}"></a>
                    </td>
                </tr>
                <tr align="center">
                    <td colspan="2">
                       ID:{{use.id}}&nbsp&nbsp&nbsp&nbsp{{use.user_name}}</td>
                </tr>
                <tr align="center">
                    <td>排名：<span color=blue>{{forloop.counter}}</span></td>
                    <td>票数：<span color=red>{{use.vote_num}}</span></td>
                </tr>
            </table>
        </td>
        </form>

        {% endif %}

    {% endfor %}


{#    <tr align="right">#}
{#        <td colspan="5" align="right">#}
{#            <form method="post" action="index.asp">#}
{#                首页 上一页 下一页 尾页 页次：#}
{#                <sapn color=red>1</sapn>#}
{#                /1页 共<span color=red>15</span>条记录 15条/页 转到：<input type='text'#}
{#                                                                  name='page'#}
{#                                                                  size=4#}
{#                                                                  maxlength=10#}
{#                                                                  class=input#}
{#                                                                  value=1>#}
{#                <input class=input type='submit' value=' 转到 ' name='cndok'></span></p>#}
{#            </form>#}
{#        </td>#}
{#    </tr>#}



</table>

<!-- 登录表单 -->
<form class="login_form_con">
    <div class="login_form">
        <div class="login_title">
            <h3>登 录</h3>
            <a href="javascript:;" class="shutoff">关闭</a>
        </div>
        <div class="form_group">
            <input id="mobile" type="text" name="mobile" autocomplete="off">
            <div class="input_tip">手机号</div>
            <div id="login-mobile-err" class="error_tip">手机号不能为空</div>
        </div>
        <div class="form_group">
            <input id="password" type="password" name="password">
            <div class="input_tip">密码(不少于6位)</div>
            <div id="login-password-err" class="error_tip">密码不能为空</div>
        </div>
        <input type="submit" name="" value="登 录" class="input_sub">
        <div class="down_link">还没有账号？<a href="javascript:;" class="to_register">立即注册</a></div>
    </div>
    <div class="mask"></div>
</form>

<!-- 注册表单 -->
<form class="register_form_con">
    <div class="register_form">
        <div class="register_title">
            <h3>注 册</h3>
            <a href="javascript:;" class="shutoff">关闭</a>
        </div>

        <div class="form_group">
            <input type="text" name="smscode" id="smscode" class="code_pwd">
            <div class="input_tip">用户名</div>
            <div id="register-sms-code-err" class="error_tip">用户名不能为空</div>
        </div>

        <div class="form_group">
            <input type="text" name="mobile" autocomplete="off" id="register_mobile" class="phone_input">
            <div class="input_tip">手机号</div>
            <div id="register-mobile-err" class="error_tip">手机号不能为空</div>
        </div>
{#        <div class="form_group">#}
{#            <input type="text" name="code_pwd" id="imagecode" class="code_pwd">#}
{#            <div class="input_tip">图形验证码</div>#}
{#            <img src="../../static/news/images/pic_code.png" class="get_pic_code" onclick="generateImageCode()">#}
{#            <div id="register-image-code-err" class="error_tip">图形码不能为空</div>#}
{#        </div>#}
{#        <div class="form_group">#}
{#            <input type="text" name="smscode" id="smscode" class="code_pwd">#}
{#            <div class="input_tip">手机验证码</div>#}
{#            <a href="javascript:;" class="get_code" onclick="sendSMSCode()">点击获取验证码</a>#}
{#            <div id="register-sms-code-err" class="error_tip">验证码不能为空</div>#}
{#        </div>#}
        <div class="form_group">
            <input type="password" name="password" id="register_password" class="pass_input">
            <div class="input_tip">密码(不少于6位)</div>
            <div id="register-password-err" class="error_tip">密码不能为空</div>
        </div>
        <input type="submit" name="" value="注 册" class="input_sub">
        <div class="down_link">已有账号？<a href="javascript:;" class="to_login">立即登录</a></div>
    </div>
    <div class="mask"></div>
</form>


<table cellSpacing=0 cellPadding=0 align=center background="/static/images/botbj.jpg" width="960px">
    <tr>
        <td height=60 align="center" id="Bottom"><a href="https://www.xlxy.edu.cn/" target="_blank">新联学院</a> Copyright
            2018-2019 新联学院 毕业设计 &#8482;
        </td>
    </tr>
</table>
</body>
</html>